package Person.ith_27;

import javax.crypto.spec.RC2ParameterSpec;
import java.util.Scanner;
abstract class Shape{
    double PI =3.14;
    public abstract double getPerimeter();
    public abstract double getArea();
}
class Rectangle extends Shape{
int width,length;
Rectangle(int width,int length){
    this.length=length;
    this.width=width;
}
    @Override
    public double getPerimeter() {
        return 2*(width+length);
    }

    @Override
    public double getArea() {
        return width*length;
    }
    @Override
    public String toString(){
        return "[width=" + width + ", length=" + length + "]";
    }
}
class Circle extends Shape{
int radius;
Circle(int radius)
{
    this.radius=radius;
}
    @Override
    public double getPerimeter() {
        return 2*PI*radius;
    }

    @Override
    public double getArea() {
        return PI*radius*radius;
    }
    @Override
    public String toString(){
        return "[radius=" + radius + "]";
    }

}
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        Shape [] arr= new Shape[n];
        for(int i=0;i<n;i++)
        {
            String a= sc.nextLine();
            if(a.equals("rect")){
                int width=sc.nextInt();
                int length = sc.nextInt();
            }
        }
    }
}
